# SPDX-FileCopyrightText: 2013 SAP SE Srdjan Boskovic <srdjan.boskovic@sap.com>
#
# SPDX-License-Identifier: Apache-2.0

FUNC_DESC_STFC_STRUCTURE = {
    "name": "STFC_STRUCTURE",
    "parameters": [
        {
            "name": "ECHOSTRUCT",
            "parameter_type": "RFCTYPE_STRUCTURE",
            "direction": "RFC_EXPORT",
            "nuc_length": 144,
            "uc_length": 264,
            "decimals": 0,
            "default_value": "",
            "optional": False,
            "type_description": {
                "name": "RFCTEST",
                "fields": [
                    {
                        "name": "RFCFLOAT",
                        "field_type": "RFCTYPE_FLOAT",
                        "nuc_length": 8,
                        "nuc_offset": 0,
                        "uc_length": 8,
                        "uc_offset": 0,
                        "decimals": 16,
                        "type_description": None,
                    },
                    {
                        "name": "RFCCHAR1",
                        "field_type": "RFCTYPE_CHAR",
                        "nuc_length": 1,
                        "nuc_offset": 8,
                        "uc_length": 2,
                        "uc_offset": 8,
                        "decimals": 0,
                        "type_description": None,
                    },
                    {
                        "name": "RFCINT2",
                        "field_type": "RFCTYPE_INT2",
                        "nuc_length": 2,
                        "nuc_offset": 10,
                        "uc_length": 2,
                        "uc_offset": 10,
                        "decimals": 0,
                        "type_description": None,
                    },
                    {
                        "name": "RFCINT1",
                        "field_type": "RFCTYPE_INT1",
                        "nuc_length": 1,
                        "nuc_offset": 12,
                        "uc_length": 1,
                        "uc_offset": 12,
                        "decimals": 0,
                        "type_description": None,
                    },
                    {
                        "name": "RFCCHAR4",
                        "field_type": "RFCTYPE_CHAR",
                        "nuc_length": 4,
                        "nuc_offset": 13,
                        "uc_length": 8,
                        "uc_offset": 14,
                        "decimals": 0,
                        "type_description": None,
                    },
                    {
                        "name": "RFCINT4",
                        "field_type": "RFCTYPE_INT",
                        "nuc_length": 4,
                        "nuc_offset": 20,
                        "uc_length": 4,
                        "uc_offset": 24,
                        "decimals": 0,
                        "type_description": None,
                    },
                    {
                        "name": "RFCHEX3",
                        "field_type": "RFCTYPE_BYTE",
                        "nuc_length": 3,
                        "nuc_offset": 24,
                        "uc_length": 3,
                        "uc_offset": 28,
                        "decimals": 0,
                        "type_description": None,
                    },
                    {
                        "name": "RFCCHAR2",
                        "field_type": "RFCTYPE_CHAR",
                        "nuc_length": 2,
                        "nuc_offset": 27,
                        "uc_length": 4,
                        "uc_offset": 32,
                        "decimals": 0,
                        "type_description": None,
                    },
                    {
                        "name": "RFCTIME",
                        "field_type": "RFCTYPE_TIME",
                        "nuc_length": 6,
                        "nuc_offset": 29,
                        "uc_length": 12,
                        "uc_offset": 36,
                        "decimals": 0,
                        "type_description": None,
                    },
                    {
                        "name": "RFCDATE",
                        "field_type": "RFCTYPE_DATE",
                        "nuc_length": 8,
                        "nuc_offset": 35,
                        "uc_length": 16,
                        "uc_offset": 48,
                        "decimals": 0,
                        "type_description": None,
                    },
                    {
                        "name": "RFCDATA1",
                        "field_type": "RFCTYPE_CHAR",
                        "nuc_length": 50,
                        "nuc_offset": 43,
                        "uc_length": 100,
                        "uc_offset": 64,
                        "decimals": 0,
                        "type_description": None,
                    },
                    {
                        "name": "RFCDATA2",
                        "field_type": "RFCTYPE_CHAR",
                        "nuc_length": 50,
                        "nuc_offset": 93,
                        "uc_length": 100,
                        "uc_offset": 164,
                        "decimals": 0,
                        "type_description": None,
                    },
                ],
            },
            "parameter_text": "Exporting structure",
        },
        {
            "name": "RESPTEXT",
            "parameter_type": "RFCTYPE_CHAR",
            "direction": "RFC_EXPORT",
            "nuc_length": 255,
            "uc_length": 510,
            "decimals": 0,
            "default_value": "",
            "optional": False,
            "type_description": None,
            "parameter_text": "Exporting response message",
        },
        {
            "name": "IMPORTSTRUCT",
            "parameter_type": "RFCTYPE_STRUCTURE",
            "direction": "RFC_IMPORT",
            "nuc_length": 144,
            "uc_length": 264,
            "decimals": 0,
            "default_value": "",
            "optional": False,
            "type_description": {
                "name": "RFCTEST",
                "fields": [
                    {
                        "name": "RFCFLOAT",
                        "field_type": "RFCTYPE_FLOAT",
                        "nuc_length": 8,
                        "nuc_offset": 0,
                        "uc_length": 8,
                        "uc_offset": 0,
                        "decimals": 16,
                        "type_description": None,
                    },
                    {
                        "name": "RFCCHAR1",
                        "field_type": "RFCTYPE_CHAR",
                        "nuc_length": 1,
                        "nuc_offset": 8,
                        "uc_length": 2,
                        "uc_offset": 8,
                        "decimals": 0,
                        "type_description": None,
                    },
                    {
                        "name": "RFCINT2",
                        "field_type": "RFCTYPE_INT2",
                        "nuc_length": 2,
                        "nuc_offset": 10,
                        "uc_length": 2,
                        "uc_offset": 10,
                        "decimals": 0,
                        "type_description": None,
                    },
                    {
                        "name": "RFCINT1",
                        "field_type": "RFCTYPE_INT1",
                        "nuc_length": 1,
                        "nuc_offset": 12,
                        "uc_length": 1,
                        "uc_offset": 12,
                        "decimals": 0,
                        "type_description": None,
                    },
                    {
                        "name": "RFCCHAR4",
                        "field_type": "RFCTYPE_CHAR",
                        "nuc_length": 4,
                        "nuc_offset": 13,
                        "uc_length": 8,
                        "uc_offset": 14,
                        "decimals": 0,
                        "type_description": None,
                    },
                    {
                        "name": "RFCINT4",
                        "field_type": "RFCTYPE_INT",
                        "nuc_length": 4,
                        "nuc_offset": 20,
                        "uc_length": 4,
                        "uc_offset": 24,
                        "decimals": 0,
                        "type_description": None,
                    },
                    {
                        "name": "RFCHEX3",
                        "field_type": "RFCTYPE_BYTE",
                        "nuc_length": 3,
                        "nuc_offset": 24,
                        "uc_length": 3,
                        "uc_offset": 28,
                        "decimals": 0,
                        "type_description": None,
                    },
                    {
                        "name": "RFCCHAR2",
                        "field_type": "RFCTYPE_CHAR",
                        "nuc_length": 2,
                        "nuc_offset": 27,
                        "uc_length": 4,
                        "uc_offset": 32,
                        "decimals": 0,
                        "type_description": None,
                    },
                    {
                        "name": "RFCTIME",
                        "field_type": "RFCTYPE_TIME",
                        "nuc_length": 6,
                        "nuc_offset": 29,
                        "uc_length": 12,
                        "uc_offset": 36,
                        "decimals": 0,
                        "type_description": None,
                    },
                    {
                        "name": "RFCDATE",
                        "field_type": "RFCTYPE_DATE",
                        "nuc_length": 8,
                        "nuc_offset": 35,
                        "uc_length": 16,
                        "uc_offset": 48,
                        "decimals": 0,
                        "type_description": None,
                    },
                    {
                        "name": "RFCDATA1",
                        "field_type": "RFCTYPE_CHAR",
                        "nuc_length": 50,
                        "nuc_offset": 43,
                        "uc_length": 100,
                        "uc_offset": 64,
                        "decimals": 0,
                        "type_description": None,
                    },
                    {
                        "name": "RFCDATA2",
                        "field_type": "RFCTYPE_CHAR",
                        "nuc_length": 50,
                        "nuc_offset": 93,
                        "uc_length": 100,
                        "uc_offset": 164,
                        "decimals": 0,
                        "type_description": None,
                    },
                ],
            },
            "parameter_text": "Importing structure",
        },
        {
            "name": "RFCTABLE",
            "parameter_type": "RFCTYPE_TABLE",
            "direction": "RFC_TABLES",
            "nuc_length": 144,
            "uc_length": 264,
            "decimals": 0,
            "default_value": "",
            "optional": False,
            "type_description": {
                "name": "RFCTEST",
                "fields": [
                    {
                        "name": "RFCFLOAT",
                        "field_type": "RFCTYPE_FLOAT",
                        "nuc_length": 8,
                        "nuc_offset": 0,
                        "uc_length": 8,
                        "uc_offset": 0,
                        "decimals": 16,
                        "type_description": None,
                    },
                    {
                        "name": "RFCCHAR1",
                        "field_type": "RFCTYPE_CHAR",
                        "nuc_length": 1,
                        "nuc_offset": 8,
                        "uc_length": 2,
                        "uc_offset": 8,
                        "decimals": 0,
                        "type_description": None,
                    },
                    {
                        "name": "RFCINT2",
                        "field_type": "RFCTYPE_INT2",
                        "nuc_length": 2,
                        "nuc_offset": 10,
                        "uc_length": 2,
                        "uc_offset": 10,
                        "decimals": 0,
                        "type_description": None,
                    },
                    {
                        "name": "RFCINT1",
                        "field_type": "RFCTYPE_INT1",
                        "nuc_length": 1,
                        "nuc_offset": 12,
                        "uc_length": 1,
                        "uc_offset": 12,
                        "decimals": 0,
                        "type_description": None,
                    },
                    {
                        "name": "RFCCHAR4",
                        "field_type": "RFCTYPE_CHAR",
                        "nuc_length": 4,
                        "nuc_offset": 13,
                        "uc_length": 8,
                        "uc_offset": 14,
                        "decimals": 0,
                        "type_description": None,
                    },
                    {
                        "name": "RFCINT4",
                        "field_type": "RFCTYPE_INT",
                        "nuc_length": 4,
                        "nuc_offset": 20,
                        "uc_length": 4,
                        "uc_offset": 24,
                        "decimals": 0,
                        "type_description": None,
                    },
                    {
                        "name": "RFCHEX3",
                        "field_type": "RFCTYPE_BYTE",
                        "nuc_length": 3,
                        "nuc_offset": 24,
                        "uc_length": 3,
                        "uc_offset": 28,
                        "decimals": 0,
                        "type_description": None,
                    },
                    {
                        "name": "RFCCHAR2",
                        "field_type": "RFCTYPE_CHAR",
                        "nuc_length": 2,
                        "nuc_offset": 27,
                        "uc_length": 4,
                        "uc_offset": 32,
                        "decimals": 0,
                        "type_description": None,
                    },
                    {
                        "name": "RFCTIME",
                        "field_type": "RFCTYPE_TIME",
                        "nuc_length": 6,
                        "nuc_offset": 29,
                        "uc_length": 12,
                        "uc_offset": 36,
                        "decimals": 0,
                        "type_description": None,
                    },
                    {
                        "name": "RFCDATE",
                        "field_type": "RFCTYPE_DATE",
                        "nuc_length": 8,
                        "nuc_offset": 35,
                        "uc_length": 16,
                        "uc_offset": 48,
                        "decimals": 0,
                        "type_description": None,
                    },
                    {
                        "name": "RFCDATA1",
                        "field_type": "RFCTYPE_CHAR",
                        "nuc_length": 50,
                        "nuc_offset": 43,
                        "uc_length": 100,
                        "uc_offset": 64,
                        "decimals": 0,
                        "type_description": None,
                    },
                    {
                        "name": "RFCDATA2",
                        "field_type": "RFCTYPE_CHAR",
                        "nuc_length": 50,
                        "nuc_offset": 93,
                        "uc_length": 100,
                        "uc_offset": 164,
                        "decimals": 0,
                        "type_description": None,
                    },
                ],
            },
            "parameter_text": "Importing/exporting table",
        },
    ],
}
